package com.echat.business.book.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author chentl123
 * @since 2019-04-24
 */
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer"})
@TableName("echo_business_book")
public class Book extends Model<Book> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Integer id;
    /**
     * 书籍类型 | 0 1 2 3 4 5 6 7 8  待完善
     */
    private Integer type;
    /**
     * 书名
     */
    private String bookName;
    /**
     * 购买地址
     */
    private String purchaseAddres;
    /**
     * 阅读量
     */
    private Integer readAmount;
    /**
     * 发行时间
     */
    private Date issueDate;
    /**
     * 点赞
     */
    private Integer likeMount;
    /**
     * 关注
     */
    private Integer followMount;
    /**
     * 标签
     */
    private String tags;
    /**
     * 作者名
     */
    private String author;
    /**
     * 电子书地址
     */
    private String epubUrl;
    /**
     *  简介
     */
    private String intruduction;
    /**
     * 封面图片地址
     */
    private String coverUrl;
    private Integer updateby;
    private Date updateTime;
    private Integer createby;
    private Date createTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEpubUrl() {
        return epubUrl;
    }

    public void setEpubUrl(String epubUrl) {
        this.epubUrl = epubUrl;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getPurchaseAddres() {
        return purchaseAddres;
    }

    public void setPurchaseAddres(String purchaseAddres) {
        this.purchaseAddres = purchaseAddres;
    }

    public Integer getReadAmount() {
        return readAmount;
    }

    public void setReadAmount(Integer readAmount) {
        this.readAmount = readAmount;
    }

    public Date getIssueDate() {
        return issueDate;
    }

    public void setIssueDate(Date issueDate) {
        this.issueDate = issueDate;
    }

    public Integer getLikeMount() {
        return likeMount;
    }

    public void setLikeMount(Integer likeMount) {
        this.likeMount = likeMount;
    }

    public Integer getFollowMount() {
        return followMount;
    }

    public void setFollowMount(Integer followMount) {
        this.followMount = followMount;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getUpdateby() {
        return updateby;
    }

    public void setUpdateby(Integer updateby) {
        this.updateby = updateby;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getCreateby() {
        return createby;
    }

    public void setCreateby(Integer createby) {
        this.createby = createby;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getIntruduction() {
        return intruduction;
    }

    public void setIntruduction(String intruduction) {
        this.intruduction = intruduction;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }


    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", type=" + type +
                ", bookName='" + bookName + '\'' +
                ", purchaseAddres='" + purchaseAddres + '\'' +
                ", readAmount=" + readAmount +
                ", issueDate=" + issueDate +
                ", likeMount=" + likeMount +
                ", followMount=" + followMount +
                ", tags='" + tags + '\'' +
                ", author='" + author + '\'' +
                ", epubUrl='" + epubUrl + '\'' +
                ", updateby=" + updateby +
                ", updateTime=" + updateTime +
                ", createby=" + createby +
                ", createTime=" + createTime +
                '}';
    }
}
